package org.come.Frame;

import org.come.Jpanel.SkillMsgJpaenl;
import org.come.until.FormsManagement;
import org.come.until.Music;

import javax.swing.*;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;


/**
 * 战斗法术描述框
 * @author
 *
 * @date
 */
public class SkillMsgJframe extends JInternalFrame implements MouseListener{
	private SkillMsgJpaenl skillMsgJpaenl;

	public static SkillMsgJframe getSkillMsgJframe() {
		return (SkillMsgJframe)FormsManagement.getInternalForm(34).getFrame();
	}






	public SkillMsgJframe() {
		// TODO Auto-generated constructor stub
		skillMsgJpaenl=new SkillMsgJpaenl();
		this.add(skillMsgJpaenl);

		this.addMouseListener(this);
		this.setBackground(new Color(0,0,0,0));
		this.addMouseMotionListener(new MouseMotionListener() {

			@Override
			public void mouseMoved(MouseEvent e) {

			}

			@Override
			public void mouseDragged(MouseEvent e) {
				// TODO Auto-generated method stub

			}
		});
		this.setBorder(BorderFactory.createEmptyBorder());//去除内部窗体的边框
		((BasicInternalFrameUI)this.getUI()).setNorthPane(null);//去除顶部的边框
		this.setBounds(1024-170, 160,420,350);//设置窗口出现的位置
		this.pack();
		this.setVisible(false);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


	}


	public static void main(String[] args) {
		new SkillMsgJframe();
	}


	@Override
	public void mouseClicked(MouseEvent e) {

	}





	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		//开启窗口音效
		Music.addyinxiao("关闭窗口.mp3");
		//打开了窗体
		if(e.isMetaDown()){//检测鼠标右键单击
			FormsManagement.HideForm(46);
			FormsManagement.HideForm(34);
		}
	}





	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub

	}





	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub

	}





	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub

	}






	public SkillMsgJpaenl getSkillMsgJpaenl() {
		return skillMsgJpaenl;
	}






	public void setSkillMsgJpaenl(SkillMsgJpaenl skillMsgJpaenl) {
		this.skillMsgJpaenl = skillMsgJpaenl;
	}








}
